export interface loginFormData {
  username: string
  passoword: string
}
interface userRes {
  code: number
  message: string
  ok: boolean
}

export interface loginRes extends userRes {
  data: string
}

export interface userInfoRes extends userRes {
  data: {
    routes: string[]
    buttons: string[]
    roles: string[]
    name: string
    avatar: string
  }
}

export interface aclRecordsObj {
  id?: number
  username?: string
  password?: string
  name?: string
  phone?: string
  roleName?: string
}
export type aclRecords = aclRecordsObj[]

export interface aclListRes extends userRes {
  data: {
    records: aclRecords
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
    pages: number
  }
}

export interface roleListData {
  id?: number
  createTime?: string
  updateTime?: string
  roleName: string
  remark: null
}

export type roleListDataArr = roleListData[]

export interface roleListRes extends userRes {
  data: {
    assignRoles: roleListDataArr
    allRolesList: roleListDataArr
  }
}

export interface addRoleData {
  roleIdList: number[]
  userId: number
}
